package me.shiqiang.im.service;

import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @author cuishiqiang
 * @date 2017/12/9 下午2:58
 */
@FeignClient(name = "im-http-service",url = "http://localhost:8080")
@RequestMapping("im/group")
public interface GroupClient {

    @GetMapping("{groupId}/users")
    GroupReturnObj getGroupUsers(@PathVariable("groupId") Long groupId);

    @GetMapping("/{groupId}/isMuted/{userId}")
    boolean isMuted(@PathVariable("groupId") Long groupId, @PathVariable("userId") Long userId);

    @GetMapping("/{groupId}/allMutedAndIsNormal/{userId}")
    boolean allMutedAndIsNormal(@PathVariable("groupId") Long groupId, @PathVariable("userId") Long userId);

    @GetMapping("{userId}/isNoDisturb/{sessionId}/{ctype}")
    boolean isNoDisturb(@PathVariable("userId") Long userId, @PathVariable("sessionId") Long sessionId, @PathVariable("ctype") int ctype);
}
